<?php

class goodsdesc{
public function index(){
require_once APP_ROOT_PATH.'app/Lib/deal.php';
$id = intval($GLOBALS['request']['id']);
$item = get_deal($id);
$root = getGoodsArray($item);
$root['return'] = 1;
$root['attr'] = getAttrArray($id);
$images = array();
$sql = 'select img from '.DB_PREFIX.'deal_gallery where deal_id = '.intval($id);
$list = $GLOBALS['db']->getAll($sql);
$gallery = array();
$big_gallery = array();
foreach($list as $k=>$image){
$gallery[] = get_abs_img_root(get_spec_image($image['img'],320,320,0));
$big_gallery[] = get_abs_img_root(get_spec_image($image['img'],0,0,0));
}
$root['gallery'] = $gallery;
$root['big_gallery'] = $big_gallery;
output($root);
}
}

?>